import server from "../../server/index"

//  请求分类数据
const getCategory = async () => {
    var data = await server.post('/api/product/getCategory')
    return Promise.resolve(data)
}

//  请求全部数据
const getAllProduct = async () => {
    var data = await server.post('/api/product/getAllProduct', { "categoryID": [], "currentPage": 1, "pageSize": 35 })
    return Promise.resolve(data)
}


//  请求商品数据
const getProductByCategory = async () => {
    var data = await server.post('/api/product/getProductByCategory', { "categoryID": [1], "currentPage": 1, "pageSize": 15 })
    return Promise.resolve(data)
}

export {
    getCategory,
    getAllProduct,
    getProductByCategory
}